package com.iecas.entity;

import com.iecas.enums.Direction;
import lombok.Data;

@Data
public class Base {
    protected String id;
    protected int x, y, width, height;
    protected int speed;
    protected Direction direction;

    public void move(){
        switch (direction){
            case UP:
                y = y - speed;
                break;
            case DOWN:
                y = y + speed;
                break;
            case LEFT:
                x = x - speed;
                break;
            case RIGHT:
                x = x + speed;
                break;
        }
    }
}
